package edu.nf.ch03;

import edu.nf.ch03.converter.UserConverter;
import edu.nf.ch03.entity.User;
import edu.nf.ch03.vo.UserVO;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author wangl
 * @date 2025/10/23
 */
public class Main {

    public static void main(String[] args) {
        ApplicationContext context = new AnnotationConfigApplicationContext("edu.nf.ch03");
        UserConverter converter = context.getBean(UserConverter.class);
        User user = new  User();
        user.setName("user1");
        UserVO userVO = converter.toUserVO(user);
        System.out.println(userVO.getName());
    }
}